package com.pl.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;

/**
 * (Device)实体类
 *
 * @author makejava
 * @since 2024-04-30 15:25:02
 */

public class Device implements Serializable {
    private static final long serialVersionUID = -47697827905116019L;

    private String tid;

    private Integer id;


    @Getter
    private String name;

    private String classify;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    //  @JsonFormat  1将接收得到的json数据中对应birthday 时间转换 java中Date
    //               2.处理器方法返回json数据时 将java中Date  转换为对应的字符串时间   yyyy-MM-dd
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date antime;

    private String location;
    private Date createTime;
    private Object createBy;

    @Override
    public String toString() {
        return "Device{" +
                "tid='" + tid + '\'' +
                ", id=" + id +
                ", name='" + name + '\'' +
                ", classify='" + classify + '\'' +
                ", antime=" + antime +
                ", location='" + location + '\'' +
                '}';
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClassify() {
        return classify;
    }

    public void setClassify(String classify) {
        this.classify = classify;
    }

    public Date getAntime() {
        return antime;
    }

    public void setAntime(Date antime) {
        this.antime = antime;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public void setCreateBy(String name) {
        this.createBy = createBy;
    }

    public void setCreateTime(Date date) {
        this.createTime = createTime;
    }
}

